﻿using System;
using System.Net;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Controls;

namespace DiscoveryLogic.DataServices.DataObjects.Entities
{
    public enum Gender
    {
        Male, Female, Unknown
    }

    public enum Race
    {
        AmericanIndian, AfrianAmerican, Asian, Hispanic, White, HawaiiPacificIsland, Withheld, Unknown
    }

    [DataContract(Namespace = "DiscoveryLogic.DataServices")]
    public class Person : Entity, IContainsFaultDetail
    {
        #region props
        private string _LastName;
        /// <summary></summary>
        [DataMember]
        public string LastName
        {
            get
            {
                return this._LastName;
            }
            set
            {
                if (this._LastName != value)
                {
                    this._LastName = value;
                    this.OnPropertyChanged("LastName");
                }
            }
        }

        private string _FirstName;
        /// <summary></summary>
        [DataMember]
        public string FirstName
        {
            get
            {
                return this._FirstName;
            }
            set
            {
                if (this._FirstName != value)
                {
                    this._FirstName = value;
                    this.OnPropertyChanged("FirstName");
                }
            }
        }

        private string _MidName;
        /// <summary></summary>
        [DataMember]
        public string MidName
        {
            get
            {
                return this._MidName;
            }
            set
            {
                if (this._MidName != value)
                {
                    this._MidName = value;
                    this.OnPropertyChanged("MidName");
                }
            }
        }

        private string _TitlePrefix;
        /// <summary></summary>
        [DataMember]
        public string TitlePrefix
        {
            get
            {
                return this._TitlePrefix;
            }
            set
            {
                if (this._TitlePrefix != value)
                {
                    this._TitlePrefix = value;
                    this.OnPropertyChanged("TitlePrefix");
                }
            }
        }

        private string _Suffix;
        /// <summary></summary>
        [DataMember]
        public string Suffix
        {
            get
            {
                return this._Suffix;
            }
            set
            {
                if (this._Suffix != value)
                {
                    this._Suffix = value;
                    this.OnPropertyChanged("Suffix");
                }
            }
        }

        private string _Email;
        /// <summary></summary>
        [DataMember]
        public string Email
        {
            get
            {
                return this._Email;
            }
            set
            {
                if (this._Email != value)
                {
                    this._Email = value;
                    this.OnPropertyChanged("Email");
                }
            }
        }

        private DateTime _BirthDate;
        /// <summary></summary>
        [DataMember]
        public DateTime BirthDate
        {
            get
            {
                return this._BirthDate;
            }
            set
            {
                if (this._BirthDate != value)
                {
                    this._BirthDate = value;
                    this.OnPropertyChanged("BirthDate");
                }
            }
        }

        private Gender _Gender;
        /// <summary></summary>
        [DataMember]
        public Gender Gender
        {
            get
            {
                return this._Gender;
            }
            set
            {
                if (this._Gender != value)
                {
                    this._Gender = value;
                    this.OnPropertyChanged("Gender");
                }
            }
        }

        private Race _Race;
        /// <summary></summary>
        [DataMember]
        public Race Race
        {
            get
            {
                return this._Race;
            }
            set
            {
                if (this._Race != value)
                {
                    this._Race = value;
                    this.OnPropertyChanged("Race");
                }
            }
        }
        #endregion

        public Person(Guid mentityId, EntityType mentityType, string mdomain)
            : base(mentityId, mentityType, mdomain)
        {
        }

        /// <summary>
        /// auto-prop
        /// </summary>
        [DataMember]
        public FaultDetail FaultDetail
        {
            get; set;
        }
    }
}
